@extends('admin.public.father')
@section('content')
    {{--判断，session值里是否有错误消息，有就进入--}}
    @if ($errors->any())
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    <form action="{{route('blog.store')}}" method="post">
        @csrf
        <div class="card">
            <div class="card-header">文章添加</div>
            <div class="card-body">
                <div class="form-group">
                    <label for="exampleFormControlInput1">文章标题</label>
                    <input type="text" name="title" class="form-control" id="exampleFormControlInput1">
                </div>
                <div class="form-group">
                    <label for="exampleFormControlTextarea1">文章内容</label>
                    <textarea name="content" class="form-control" id="exampleFormControlTextarea1" rows="10"></textarea>
                </div>
                <button class="btn btn-primary btn-lg btn-block">添加</button>
            </div>
        </div>
    </form>
@endsection